home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / WIN_PRO / DS-1.ZIP;1 / H.ZIP / PROTO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-10  |  3.4 KB  |  138 lines

  1. /*
  2.  * proto.h -- prototypes for library functions.
  3.  */
  4.  
  5. /*
  6.  * The following code is operating-system dependent. [@proto.01].
  7.  *  Prototypes for library functions.
  8.  */
  9.  
  10. #if PORT
  11. Deliberate Syntax Error
  12. #endif                    /* PORT */
  13.  
  14. #if AMIGA
  15. #if LATTICE
  16. #include <dos.h>
  17. #endif                    /* LATTICE */
  18. #include "../h/dproto.h"
  19. #endif                    /* AMIGA */
  20.  
  21. #if ATARI_ST
  22. #include "../h/dproto.h"
  23. #endif                    /* ATARI_ST */
  24.  
  25. #if ARM
  26. #include <stdlib.h>
  27. #include <string.h>
  28.  
  29. /* Our verson of unlink, which will fail if the named file does not exist */
  30. extern int unlink (const char *name);
  31.  
  32. /* Force a cast of the function parameter to qsort() */
  33. #define    qsort(base,n,size,cmp) \
  34.     (qsort)((base),(n),(size),(int (*) (const void *, const void *))(cmp))
  35. #endif                    /* ARM */
  36.  
  37.  
  38. #if MACINTOSH
  39. #if MPW
  40. #include <stdlib.h>
  41. #include <string.h>
  42. #else                    /* MPW */
  43. #include "../h/dproto.h"
  44. #endif                    /* MPW */
  45. #endif                    /* MACINTOSH */
  46.  
  47. #if MSDOS || OS2
  48. #if HIGHC_386
  49. #include <stdlib.h>
  50. #include <string.h>
  51. int    brk        Params((pointer p));
  52. pointer sbrk        Params((msize n));
  53. #endif                    /* HIGHC_386 */
  54. #if INTEL_386
  55. #include <dos.h>
  56. #include <stdlib.h>
  57. #include <string.h>
  58. int    brk        Params((pointer p));
  59. #endif                    /* INTEL_386 */
  60. #if MICROSOFT || TURBO || ZTC_386
  61. #include <dos.h>
  62. #ifdef StandardLib
  63. #include <string.h>
  64. #include <stdlib.h>
  65. #else                    /* StandardLib */
  66. #include "../h/dproto.h"
  67. #endif                    /* StandardLib */
  68. #endif                    /* MICROSOFT || TURBO || ZTC_386 */
  69. #endif                    /* MSDOS || OS2 */
  70.  
  71. #if UNIX
  72. #ifdef StandardLib
  73. #include <stdlib.h>
  74. #include <string.h>
  75. /*
  76.  * index() is not part of the standard library.  We use no prototype
  77.  *  because various systems disagree on the details, and they complain.
  78.  */
  79. char    *index    ();
  80. #else                    /* StandardLib */
  81. #include "../h/dproto.h"
  82. #endif                    /* StandardLib */
  83. #endif                    /* UNIX */
  84.  
  85. #if VM || MVS
  86. /* ****  TEMPORARY *** */
  87. novalue abort           Params((noargs));
  88. double  atof            Params((char *));
  89. long    atol            Params((char *));
  90. pointer calloc          Params((unsigned,unsigned));
  91. novalue exit            Params((int));
  92. char    *getenv         Params((char *));
  93. pointer malloc          Params((msize));
  94. pointer realloc         Params((pointer, unsigned));
  95. #ifdef StandardC
  96. #include <string.h>
  97. #else                                   /* StandardC */
  98. char    *strchr         Params((char *s, int i));
  99. int     strcmp          Params((char *s1, char *s2));
  100. char    *strcpy         Params((char *s1, char *s2));
  101. char    *strncat        Params((char *s1, char *s2, int n));
  102. int     strncmp         Params((char *s1, char *s2, int n));
  103. char    *strncpy        Params((char *s1, char *s2, int n));
  104. char    *ecvt        Params((double value, int count, int *dec, int* sign));
  105. double    pow        Params((double x, double y));
  106. #ifdef SystemFnc
  107. int    system        Params((char *));
  108. #endif                    /* SystemFnc */
  109. #endif                                  /* StandardC */
  110. #endif                                  /* VM || MVS */
  111.  
  112. #if VMS
  113. #include "../h/dproto.h"
  114. #endif                    /* VMS */
  115.  
  116. /*
  117.  * End of operating-system specific code.
  118.  */
  119.  
  120. #ifdef KeyboardFncs
  121. int    getch        Params((noargs));
  122. int    getche        Params((noargs));
  123. int    kbhit        Params((noargs));
  124. #endif                    /* KeyboardFncs */
  125.  
  126. #include "../h/cproto.h"
  127.  
  128. /*
  129.  * These must be after prototypes to avoid clash with system
  130.  * protoypes.
  131.  */
  132.  
  133. #if IntBits == 16
  134. #define sbrk lsbrk
  135. #define strlen lstrlen
  136. #define qsort lqsort
  137. #endif                    /* IntBits == 16 */
  138.